//
//  PayTableViewCell.m
//  DaiShengInvest
//
//  Created by 张睿 on 2017/6/30.
//  Copyright © 2017年 davinci. All rights reserved.
//

#import "PayTableViewCell.h"

@implementation PayTableViewCell



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
    }
    
    return self;
}


- (void)setupUI{
    
    self.backgroundColor = [UIColor clearColor];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    
    self.iconImageView = [UIImageView new];
    
    self.iconImageView.contentMode = UIViewContentModeScaleAspectFit;
    
    [self addSubview:self.iconImageView];
    
    [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.mas_equalTo(self).offset(15 * SCREENH6);
        make.centerY.mas_equalTo(self);
        make.width.mas_equalTo(30 * SCREENH6);
        make.height.mas_equalTo(26 * SCREENH6);
    }];
    
    
    self.tltleLabel = [UILabel new];
    
    self.tltleLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:15 * SCREENH6];
    self.tltleLabel.textColor = ColorWithRGB(0xffffff);
    self.tltleLabel.textAlignment = NSTextAlignmentRight;
    
    [self addSubview:self.tltleLabel];
    
    [self.tltleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.mas_equalTo(self.iconImageView.mas_trailing).offset(20 * SCREENH6);
        make.centerY.mas_equalTo(self.iconImageView.mas_top);
    }];
    
    
    self.subTltleLabel = [UILabel new];
    
    self.subTltleLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:13 * SCREENH6];
    self.subTltleLabel.textColor = ColorWithRGB(0xbebebe);
    self.subTltleLabel.textAlignment = NSTextAlignmentRight;
    
    [self addSubview:self.subTltleLabel];
    
    [self.subTltleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.mas_equalTo(self.tltleLabel);
        make.top.mas_equalTo(self.tltleLabel.mas_bottom);
    }];
    
    self.lineView = [UIView new];
    
    self.lineView.backgroundColor = [UIColor whiteColor];
    self.lineView.alpha = 0.1;
    
    [self addSubview:self.lineView];
    
    
    [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.bottom.mas_equalTo(self);
        make.height.mas_equalTo(1 * SCREENH6);
    }];
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
